package com.simsuni.core;

import java.util.HashMap;

abstract public class SimProcess {
	
	private String name;
	private SimEntity entrance;
	private HashMap<String ,SimEntity> entityMap = new HashMap<String, SimEntity>();
	
	public SimProcess(String name, SimEntity entrance){
		this.name = name;
		this.entrance = entrance;
		addEntity(entrance);
	}
	public String getName() {
		return name;
	}
	abstract public SimEntity getNextEntity(SimEntity foreEntity);
	public void addEntity(SimEntity entity){
		entityMap.put(entity.getName(), entity);
	}
	protected SimEntity getEntity(String name){
		return entityMap.get(name);
	}
	public SimEntity getEntrance(){
		return entrance;
	}
//	public SimEntity getTartget(){
//		
//		//TODO JAKE
//		return null;
//	}
}
